package com.hfzy.ihk.web.websocket.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hfzy.ihk.facade.freeswitchCall.service.FreeswitchCallService;
import com.hfzy.ihk.facade.websocket.linkcall.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

/**
 * Created by Administrator on 2018/7/31.
 *
 * @author wws
 */
@Controller
@RequestMapping("page")
public class ViewController {


    @Autowired
    WebSocketService webSocketService;

    @Reference(version = "1.0.0")
    FreeswitchCallService freeswitchCallService;

    @RequestMapping("test")
    @ResponseBody
    public String hello(){
        Map<String,String> map = freeswitchCallService.handleClickCallWebSocket("","","","","","","","","","","","","","","","","","","","",true,"");
        System.out.println(map.toString());
        return map.toString();

    }

    @RequestMapping("/p")
    public ModelAndView p1(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("page/testZy");
        return modelAndView;
    }


}
